package com.hgkj.cloud.base.service.impl;

import com.hgkj.cloud.base.common.PageInfo;
import com.hgkj.cloud.base.dao.TenantPsychologicalAcvitityMapper;
import com.hgkj.cloud.base.domain.TenantPsychologicalAcvitity;
import com.hgkj.cloud.base.service.TenantPsychologicalAcvitityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TenantPsychologicalAcvitityServiceImpl implements TenantPsychologicalAcvitityService {

    @Autowired
    private TenantPsychologicalAcvitityMapper tenantPsychologicalAcvitityMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return tenantPsychologicalAcvitityMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(TenantPsychologicalAcvitity record) {
        return tenantPsychologicalAcvitityMapper.insert(record);
    }

    @Override
    public int insertSelective(TenantPsychologicalAcvitity record) {
        return tenantPsychologicalAcvitityMapper.insertSelective(record);
    }

    @Override
    public TenantPsychologicalAcvitity selectByPrimaryKey(Long id) {
        return tenantPsychologicalAcvitityMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(TenantPsychologicalAcvitity record) {
        return tenantPsychologicalAcvitityMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(TenantPsychologicalAcvitity record) {
        return tenantPsychologicalAcvitityMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Map<String, Object>> listPsychologicalAcvitity(PageInfo pi, Map<String, Object> map) {
        if(pi != null){
            map.put("currentCount", pi.getCurrentCount());
            map.put("pageSize", pi.getPageSize());
        }
        return tenantPsychologicalAcvitityMapper.listPsychologicalAcvitity(map);
    }

    @Override
    public Map<String, Object> getPsychologicalAcvitityByid(long id) {
        return tenantPsychologicalAcvitityMapper.getPsychologicalAcvitityByid(id);
    }

    @Override
    public long listPsychologicalAcvitityCount(Map<String, Object> map) {
        return tenantPsychologicalAcvitityMapper.listPsychologicalAcvitityCount(map);
    }

    @Override
    public int delPsychologicalAcvitity(Long id) {
        return tenantPsychologicalAcvitityMapper.delPsychologicalAcvitity(id);
    }

    @Override
    public List<Map<String, Object>> getPsychologicalAcvititystatistics(Map<String, Object> map) {
        return tenantPsychologicalAcvitityMapper.getPsychologicalAcvititystatistics(map);
    }

    @Override
    public List<Map<String, Object>> statMonthActivity(Map<String, Object> map) {
        return tenantPsychologicalAcvitityMapper.statMonthActivity(map);
    }

    @Override
    public List<Map<String, Object>> statAreaActivity(Map<String, Object> map){
        return tenantPsychologicalAcvitityMapper.statAreaActivity(map);
    }

    @Override
    public List<Map<String, Object>> statTypeActivity(Map<String, Object> map){
        return tenantPsychologicalAcvitityMapper.statTypeActivity(map);
    }
}
